package ar.com.softtek.departments.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.validation.Validator;
import org.springframework.web.bind.annotation.RequestMapping;

import ar.com.softtek.departments.dao.Dao;
import ar.com.softtek.departments.model.Department;

@Controller
@RequestMapping("/editDepartment.html")
public class EditDepartmentController extends MappedEntityFormController<Department> {
	@Override
	public Class<Department> getActualClass() {
		return Department.class;
	}

	@Override
	@Autowired
	@Qualifier("departmentValidator")
	public void setMappedModelValidator(Validator validator) {
		this.validator = validator;
	}

	@Override
	@Autowired
	@Qualifier("departmentDao")
	public void setModelDao(Dao<Department> modelDao) {
		this.modelDao = modelDao;
	}
}
